<?php

class Application_Form_Login extends Zend_Form
{

    public function init()
    {
        $this->setName('login')
        	->setMethod('post');
        
        $username = new Zend_Form_Element_Text('username');
        $username->addFilter('StringTrim')
        	->addFilter('StringToLower')
        	->addValidator('StringLength', false, array(0, 50))
        	->setRequired(true)
        	//->setValue('10000000') // Must be removed
        	->setLabel('Username:')
        	->setAttrib('class', 'short')
        	->setAttrib('id', 'zfform');
        
        $password = new Zend_Form_Element_Password('password');
        $password->addFilter('StringTrim')
        	->addValidator('StringLength', false, array(0, 50))
        	->setRequired(true)
        	->setLabel('Password:')
        	->setAttrib('class', 'short')
        	->setAttrib('id', 'zfform');
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setRequired(false)
        	->setIgnore(true)
        	->setLabel('Login')
        	->setAttrib('id', 'submit');
        
        $this->addElements(array($username, $password, $submit));
    }


}

